package com.mantou.mantouaiagent.util;

/**
 * @Author: 馒头
 * @CreateTime: 2025-06-02
 * @Description:
 */
public class ThreadLocalUtil {

    public static ThreadLocal<Integer> threadLocal = new InheritableThreadLocal<>();

    public static void setUserId(Integer userId) {
        threadLocal.set(userId);
    }

    public static Integer getUserId() {
        return threadLocal.get();
    }

    public static void removeUserId() {
        threadLocal.remove();
    }
}
